#!/usr/bin/env ruby

dir = File.dirname(__FILE__)
require File.join(dir, '..', '..', 'lib', 'monkey', 'time')

########################################

def test_to_s
  # postconditions
  snow = Time.now.to_s
  assert_match /^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$/, snow
  
  slocal = Time.local(2007, 'nov', 8, 9).to_s
  assert_equal '2007-11-08 09:00:00', slocal
end

########################################

if $0 == __FILE__
  require 'assert'
  
  test_to_s
  puts 'all asserts pass :-)'
end
